package cn.wolfcode.luowowo.article.query;

import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;

@Getter
public class TravelCondition {

//    private int orderType = -1;
//    private int travelTimeType = -1;
//    private int perExpendType = -1;
//    private int dayType = -1;
    public static final HashMap<Integer, TravelCondition> dayMap = new HashMap<>();
    public static final HashMap<Integer, TravelCondition> travelTimeMap = new HashMap<>();
    public static final HashMap<Integer, TravelCondition> perExpendMap = new HashMap<>();
    static {
        dayMap.put(-1, null);
        dayMap.put(1, new TravelCondition(0, 3));
        dayMap.put(2, new TravelCondition(4, 7));
        dayMap.put(3, new TravelCondition(8, 14));
        dayMap.put(4, new TravelCondition(15, Integer.MAX_VALUE));

        perExpendMap.put(-1, null);
        perExpendMap.put(1, new TravelCondition(1, 999));
        perExpendMap.put(2, new TravelCondition(1000, 6000));
        perExpendMap.put(3, new TravelCondition(6001, 20000));
        perExpendMap.put(4, new TravelCondition(20001, Integer.MAX_VALUE));

        travelTimeMap.put(-1, null);
        travelTimeMap.put(1, new TravelCondition(1, 2));
        travelTimeMap.put(2, new TravelCondition(3, 4));
        travelTimeMap.put(3, new TravelCondition(5, 6));
        travelTimeMap.put(4, new TravelCondition(7, 8));
        travelTimeMap.put(5, new TravelCondition(9, 10));
        travelTimeMap.put(6, new TravelCondition(11, 12));

    }

    private int min;
    private int max;

    public TravelCondition(int min, int max) {
        this.min = min;
        this.max = max;
    }
}
